/* MortgageCalculator
*************************************************************************************
*
*   Used to calculate mortgages
*
*************************************************************************************
*
*   Credits
*
*		Richard Rios
*		Aaron Solomon
*
*************************************************************************************
*/
#ifndef MORTGAGE_CALCULATOR
#define MORTGAGE_CALCULATOR

	#include <iostream>
	#include <iomanip>

	#include "Loan.h"
	#include "EXIT_CODE.h"

	using namespace std;
/*
************************************************************************************/

struct MortgageCalculator {
private:
	/*************************************************************************************
	*
	*	Fields
	*/
		Loan loan;
	/*
	*************************************************************************************/

	/*************************************************************************************
	*
	*	Methods
	*/
public:
		void execute();
		/*
		*	Executes the mortgage calculator.
		*/
private:
		double getUserInput		(char* inputMessage);
		/*
		*	Retrieves user input
		*
		*		inputMessage: user input
		*/

		bool initLoan();
		/*
		*
		*   Description
		*   -----------------------
		*
		*       Initializes loan to user input
		*
		*			retrieves from user
		*				1. loan amount
		*				2. number of payments
		*				3. annual interest rate
		*
		*   Takes
		*   -----------------------
		*
		*       nothing
		*
		*   Returns
		*   -----------------------
		*
		*       boolean signifying whether loan was retrieved or not
		*
		*		in the case of false, the loan was not retrieved and the driver should
		*		end its execution.
		*
		*************************************************************************************/

		void display();
		/*
		*	Displays loan information to cout.
		*
		*	the loan amount
		*	the number of payments
		*	the interest rate
		*	the monthly payments
		*	the total amount paid
		*	the total amount of interest
		*/
	/*
	*************************************************************************************/
}; //struct MortgageCalculator

#else
#endif